/**
 * Created by Administrator on 2015/12/21.
 */

console.log(this);

a = 1;
b = 2;

var f = new Function("return a+b");
//console.log(f());
var subscope = {a:4,b:5};
with (subscope){
    //var f1 = new Function("return a+b");
    //console.log(f1());
    console.log(a);
    console.log(b);
    var f1 = new Function("return a+b");
    function sum (){
        return this.a+this.b;
    }
    console.log('************');
    console.log(sum.call(subscope));
    console.log(eval('a+b'))
}

